<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeFile="ViewStudentInfo.aspx.cs" Inherits="AdminPages_ViewStudentInfo" %>

   <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">

        <asp:DataList ID="studentList" 
            runat="server" 
            CellPadding="4" 
            ForeColor="#333333"  
            OnItemCommand="studentList_ItemCommand">
            
            <ItemTemplate>
                
                Student:    <strong><%# Eval("FIRST") %> 
                                       <%# Eval("LAST") %></strong><br />                
                Address:       <strong><%# Eval("ADDRESS") %></strong><br />
                City:          <strong><%# Eval("CITY" ) %></strong><br />
                State:         <strong><%# Eval("STATE" ) %></strong><br />
                Zip Code:      <strong><%# Eval("ZIP" ) %></strong><br />
                Phone Number:  <strong><%# Eval("PHONE" ) %></strong>  <br />
                E-mail Address:<strong><%# Eval("EMAIL") %></strong><br />
                <asp:LinkButton ID="editButton" 
                    runat="server"
                    Text='<%#"Edit " + Eval("FIRST") + " " + Eval("LAST")%>'
                    CommandName="EditPlease"
                    CommandArgument='<%# Eval("ID") %>' />
                
            </ItemTemplate>
            
            <SeparatorTemplate>
                <hr />
            </SeparatorTemplate>

            <FooterStyle BackColor="#1C5E55" 
                Font-Bold="True" 
                ForeColor="White" />
            
            <AlternatingItemStyle BackColor="White" />
            
            <ItemStyle BackColor="#E3EAEB" />
            
            <SelectedItemStyle BackColor="#C5BBAF" 
                Font-Bold="True" 
                ForeColor="#333333" />
            
            <HeaderStyle BackColor="#1C5E55" 
                Font-Bold="True" 
                ForeColor="White" />
        </asp:DataList>
        
        <asp:TextBox ID="txtStudentID" 
            runat="server" 
            Visible="False"/>
        <asp:TextBox ID="txtCourseID" 
            runat="server" 
            Visible="False"/>
        
   </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:DetailsView ID="studentDetails" 
        runat="server" 
        AutoGenerateRows="False" 
        OnModeChanging="studentDetails_ModeChanging" 
        OnItemUpdating="studentDetails_ItemUpdating" >
    <Fields>
    <asp:TemplateField HeaderText="Student ID">
        <ItemTemplate>
            <asp:Label ID="firstLabel" 
                runat="server" 
                Text='<%#Bind("ID") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:Label ID="firstLabel" 
            runat="server" 
            Text='<%#Bind("ID") %>'/>
        </EditItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="First Name">
        <ItemTemplate>
            <asp:Label ID="firstLabel" 
                runat="server" 
                Text='<%#Bind("FIRST") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editFirstName" 
                runat="server" 
                Text='<%#Bind("FIRST") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertFirstName" 
                runat="server" 
                Text='<%#Bind("FIRST") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Last Name">
        <ItemTemplate>
            <asp:Label ID="lastLabel" 
                runat="server" 
                Text='<%#Bind("LAST") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editLastName" 
                runat="server" 
                Text='<%#Bind("LAST") %>' />       
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertLastName" 
                runat="server" 
                Text='<%#Bind("LAST") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Address">
        <ItemTemplate>
             <asp:Label ID="addressLabel" 
                runat="server" 
                Text='<%#Bind("ADDRESS") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editAddress" 
                runat="server" 
                Text='<%#Bind("ADDRESS") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertAddress" 
                runat="server" 
                Text='<%#Bind("ADDRESS") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="City">
        <ItemTemplate>
            <asp:Label ID="cityLabel" 
                runat="server" 
                Text='<%#Bind("CITY") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editCity" 
                runat="server" 
                Text='<%#Bind("CITY") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertCity" 
                runat="server" 
                Text='<%#Bind("CITY") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="State">
        <ItemTemplate>
            <asp:Label ID="stateLabel" 
                runat="server" 
                Text='<%#Bind("STATE") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editState" 
                runat="server" 
                Text='<%#Bind("STATE") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertState" 
                runat="server" 
                Text='<%#Bind("STATE") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Zip">
        <ItemTemplate>
            <asp:Label ID="zipLabel" 
                runat="server" 
                Text='<%#Bind("ZIP") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editZip" 
                runat="server" 
                Text='<%#Bind("ZIP") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertZip" 
                runat="server" 
                Text='<%#Bind("ZIP") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Phone Number">
        <ItemTemplate>
            <asp:Label ID="phoneLabel" 
                runat="server" 
                Text='<%#Bind("PHONE") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editPhone" 
                runat="server" 
                Text='<%#Bind("PHONE") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertPhone" 
                runat="server" 
                Text='<%#Bind("PHONE") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Email Address">
        <ItemTemplate>
            <asp:Label ID="emailLabel" 
                runat="server" 
                Text='<%#Bind("EMAIL") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editEmail" 
                runat="server" 
                Text='<%#Bind("EMAIL") %>'/>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertEmail" 
                runat="server" 
                Text='<%#Bind("EMAIL") %>'/>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:CommandField ShowEditButton="true" />
</Fields>
<HeaderTemplate>
    <strong><%#Eval("FIRST") %> <%#Eval("LAST") %></strong>
</HeaderTemplate>
</asp:DetailsView>
    </asp:Content>